<template>
	<view class="carList">
		<view class="carItem" v-for="(item, index) in carList" :key="index">
			<text>{{item}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				carList: []
			}
		},
		onShow:function(){
			this._getCarList()
		},
		methods: {
			_getCarList() {
				uni.request({
					method: 'GET',
					url: 'https://wlreaohs.xiaomy.net/common/biz/cloud/member/findHoldBanksByMemberType',
					data: {
						memberType: 3
					},
					header: { 'content-type': 'application/json' },
					success: (res) => {
						console.log(res)
						if(res.data.code == 0) {
							this.carList = res.data.data
						} else {
							
						}
					},
					fail: (err) => {
						uni.hideLoading()
						console.log(err)
					}
				})
			}
		}
	}
</script>

<style>
	.carList {
		padding: 20rpx;
	}
	.carItem {
		border: 1px solid #CCCCCC;
		display: flex;
		justify-content: center;
		padding: 30rpx 0;
		border-radius: 10rpx;
		background: #F4F2F2;
		margin-bottom: 20rpx;
	}
	.carItem:last-child {
		margin-bottom: 0;
	}
</style>
